#include "GameClientThreadModel.h"
#include "GlobalClass.h"

#include "GameClientModel.h"

GameClientThreadModel::GameClientThreadModel(QObject *parent)
    :QThread(parent)
{
    m_pGameClientModel = nullptr;
}

GameClientThreadModel::~GameClientThreadModel()
{
}

void GameClientThreadModel::run()
{
    /* 线程的相关代码 */

    m_pGameClientModel->InitOnceInThread();
    if(m_pGameClientModel->GameInit(m_pGameClientModel->m_nGameRandom) < 0)
    {
        emit m_pGameClientModel->s_Critical(_T("[GameClientThreadModel]游戏初始化失败!"));
        return;
    }
    m_pGameClientModel->GameBegin();
    m_pGameClientModel->GameOver();
}

